package com.fourhats.services;

import java.util.List;

import org.springframework.stereotype.Service;

import com.fourhats.services.dto.MarketDto;
import com.fourhats.services.dto.PublicMarketDto;
import com.fourhats.services.util.Page;

@Service
public interface MarketService {

	public List<MarketDto> getMarketsByKeyword(String keyword);
	
	public Page<MarketDto> getMarketsPageByKeyword(String keyword, int pageNumber, int pageSize);

	public MarketDto getMarketById(long marketId);
	
	public PublicMarketDto getPublicMarketById(long marketId);
	
	public MarketDto getMarketByUser(long userId);
	
	public boolean hasMarket(long userId);
	
	public List<MarketDto> getRandomlyHighlightMarkets(int maxResult);

	public Page<MarketDto> getAllMarkets(int pageNumber, int pageSize);

	public boolean existMarketWithName(String marketName, long userId);

	public void createMarket(MarketDto market, long userId);

	public void editMarket(MarketDto market);

	public void desactivateMarket(long marketId);

	public void activateMarket(long marketId);
}